package io;

import java.io.*;

/**
 * @author IT枫斗者
 * @ClassName BufferTest01.java
 * @From www.javatiaozao.com
 * @Description TODO
 */
public class BufferTest01 {
    public static void main(String[] args) throws IOException {
        //创建字符串缓冲输出流
//        BufferedWriter bfw = new BufferedWriter(new FileWriter("myStream/222.txt"));
//        //写数据
//        for(int i = 0; i<20;i++){
//            bfw.write("IT" + i);
////            bfw.write("\r\n");
//            bfw.newLine();
//            bfw.flush();
//        }
//        bfw.close();

        //创建一个字符缓冲输入流
        BufferedReader bfr = new BufferedReader(new FileReader("myStream/222.txt"));
        //特殊方法，一行行读取
        String line;
        while ((line = bfr.readLine()) != null){
            System.out.println(line);
        }
        bfr.close();
    }
}
